[deps]

[mirrors]
http://www.yassl.com/altpkg/cyassl-3.1.0.tar.xz

[main]
filesize=813832
sha512=534a60fbd120db293ad796057c87c7394a72cb2d13e45001987d7e7418335ad6c20171d06747a6134d854164c5517db6c41aee18df48ac56ab4f90511bfc7be2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
debug_flags=
[ "$DEBUGBUILD" = 1 ] && debug_flags=--enable-debug

C_EXTRA_FLAGS="-D_GNU_SOURCE $optcflags" \
./configure --prefix="$butch_prefix" $xconfflags \
  --enable-dtls --enable-opensslExtra \
  --enable-static $debug_flags \
  --disable-silent-rules \
  --enable-ipv6 --enable-ripemd --enable-sha512 \
  --enable-sessioncerts --enable-certgen
# aesni is only for cpus with aes extension, amd bulldozer+ or corei7ish
# sniffer depends on pcap

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

if false ; then
	# this was an attempt to use cyassl's openssl compatibility layer
	# however it is not fit for this yet.
	ln -sf cyassl/openssl/ "$butch_install_dir/include/"

	ln -sf libcyassl.a "$butch_install_dir/lib/libssl.a"
	ln -sf libcyassl.a "$butch_install_dir/lib/libcrypto.a"

	ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so"
	ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so.1.0.0"

	ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so"
	ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so.1.0.0"
fi

